extends "../jifu-1/jifu-1.gd"

func _extInit():
	._extInit()
	lv = 2
	addSkill("每{cd}秒赋予当前目标及其直线上的所有敌人10层<霜冻>", "寒霜射线", "jifu2", 8)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "jifu2":
		jifu2()

func jifu2():
	var eff:Eff = newEff("sk_feiZhan",sprcPos)
	eff._initFlyPos(position + (aiCha.position - position).normalized() * 1000, 800)
	eff.connect("onInCell",self,"effInCell")

func effInCell(cell):
	var cha = matCha(cell)
	if cha == null:
		cha = matCha(cell + Vector2(0, 1))
	if cha != null && cha.team != team:
		castBuff(cha, buff.b_shuangDong.new(10))